package com.itheima.api.stream.demo03;

import java.util.ArrayList;

public class StreamDemo01 {

    public static void main(String[] args) {

        ArrayList<Integer> arrayList = new ArrayList<Integer>();

        arrayList.add(23);
        arrayList.add(34);
        arrayList.add(12);
        arrayList.add(20);

        arrayList.stream().map((s) -> {

            String s1 = String.valueOf(s);
            return s1;

        }).forEach(s -> System.out.println(s));

        System.out.println("--------------------------------------------------");

        arrayList.stream().map(s -> String.valueOf(s)).mapToInt((s) -> {
            int parseInt = Integer.parseInt(s);
            parseInt = parseInt + 10;
            return parseInt;
        }).forEach(s -> System.out.println(s));

    }

}
